package cn.yr.blog.controller.app;

import cn.yr.common.core.domain.entity.YrMessage;
import cn.yr.common.core.domain.vo.PageVo;
import cn.yr.common.exception.ret.Ret;
import cn.yr.im.api.MessageApi;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "app即时通讯")
@RestController
@RequestMapping("/app/message")
public class AppMessageController {

    @Resource
    private MessageApi messageApi;

    /**
     * 分页列表
     */
    @RequestMapping("/page")
    public Ret page(@RequestBody PageVo<YrMessage> pageVo) {
        return messageApi.page(pageVo);
    }
}
